package cn.bluedot.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.bluedot.model.Condition;
import cn.bluedot.model.ControlEquVo;
import cn.bluedot.model.Equipment;
import cn.bluedot.model.EquipmentExceptionVo;
import cn.bluedot.model.ExcCondition;
import cn.bluedot.model.FeedEquVo;
import cn.bluedot.model.MonitorEquVo;
import cn.bluedot.model.MonitorVedio;
import cn.bluedot.model.SensorData;
import cn.bluedot.model.SensorDataVo;
import cn.bluedot.model.SensorVo;
import cn.bluedot.model.VideoCondition;

/**
 *
 * @author 余聪
 * @time:2019年4月17日下午7:50:40
 *
 */
public interface EquMsgShowDao {
	
        public List<Equipment> selectAllEqu();

//		public ConditionList selectConditionList(Condition condition);
        //查询设备类型
		public List<String> selectEquTypeList();
		//查询设备类型equType对应所有设备名称
		public List<String> selectEquNameList(String equType);
		//查询该userId用户所管理的所有猪舍ID
		public List<Integer> selectPigstyIdList(Integer userId);
		//查询猪舍为pigstyId下的所有猪栏
		public List<Integer> selectHogcoteIdList(Integer pigstyId);
		//通过condition条件查询传感器基本信息
		public List<SensorVo> selectSensorVo(Condition condition);
		//通过condition条件查询环控设备基本信息
		public List<ControlEquVo> selectControlEquVo(Condition condition);
		//通过condition条件查询饲喂设备基本信息
		public List<FeedEquVo> selectFeedEquVo(Condition condition);
		//通过condition条件查询监控设备基本信息
		public List<MonitorEquVo> selectMonitorEquVo(Condition condition);

		public List<SensorDataVo> selectSensorData(@Param("sensorId") Integer sensorId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
		
		public void insertSensorData(SensorData sensorData);
		
		public SensorDataVo selectSensorDataById(Integer dataId);
		
		public void updateEquipment(Equipment equipment);

		public Integer selectTableBodyTotalCount(Condition condition);

		public Float getSensorNewData(Integer sensorId);

		public List<EquipmentExceptionVo> selectEquipmentExceptionVo(
				ExcCondition excCondition);

		public Integer selectEquExcTotalCount(ExcCondition excCondition);

		public List<Integer> selectMonitorIdList(@Param("pigstyId")Integer pigstyId,@Param("hogcoteId") Integer hogcoteId);

		public List<MonitorVedio> selectEquVideoList(VideoCondition videoCondition);
}
